import axios from 'axios'
//获取首页列表信息
export const getHomeList =()=>{
    return  axios.get('/9bianli/Ajax/Section/GetCardSection.ashx?sectionName=Card%2523Top%252CCard_1%252CCard_6%252CCard_2%252CCard_5%252CCard_3%252CCard_4&isGetProduct=1')
}
//获取精选页面物品信息
export const getCateList =()=>{
    return axios.get('/9bianli//Ajax/Section/GetRecommendArticles.ashx?pageIndex=1&pageSize=20')
}
//获取精选页面分类数据信息
export const getSelection =()=>{
    return axios.get('/9bianli/Ajax/Section/GetAppSection.ashx?SectionName=Page%2523Recommend%2523')
}
//获取精选页面商品图片数据
export const getSelectionData =(i)=>{
    let infoArr=['白酒','葡萄酒','洋酒','牛栏山','奔富']
    return axios.get('/9bianli/Ajax/Section/GetRecommendArticles.ashx?pageIndex=1&pageSize=20&ArticleCategory='+encodeURI(infoArr[i]))
}
//获取分类列表商品数据
export const getClassifyData =(idx=0)=>{
    let infoArr=['白酒','葡萄酒','啤酒','黄酒','洋酒','饮料','酒具','茶叶','物料']

    return axios.get('/9bianli/Ajax/ajaxProdListJson.aspx?type=1&PageIndex=1&ProductCategory='+encodeURI(infoArr[idx])+'&_=1631148777152')
}
//分类列表商品价格排序
export const getSortList =({index,sortId})=>{
    let infoArr=['白酒','葡萄酒','啤酒','黄酒','洋酒','饮料','酒具','茶叶','物料']
    if(sortId)
        return axios.get('/9bianli/Ajax/ajaxProdListJson.aspx?type=1&PageIndex=1&ProductCategory='+encodeURI(infoArr[index])+'&OrderBy=RetailUnitPrice&Sort=ASC&_=1631172560405')
    else
    return axios.get('/9bianli/Ajax/ajaxProdListJson.aspx?type=1&PageIndex=1&ProductCategory='+encodeURI(infoArr[index])+'&OrderBy=RetailUnitPrice&Sort=DESC&_=1631172560405')
}
//获取城市地址列表
export const getCityList =()=>{
    return axios.get('/9bianli/ajax/common/getcitylist.ashx')
}